﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using hMailServer;
using MT.Mail.ServerWrap;

namespace MT.Mail.Service
{
    public class MailService
    {
        public bool Authenticate(string userName, string password)
        {
            try
            {
                HMailServer hms = new HMailServer();
                return hms.Authenticate(userName, password);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public IMAPFolders GetFolders(string userName, string password)
        {
            try
            {
                HMailServer hms = new HMailServer();

                return hms.GetFolders(userName, password);

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
